package org.efssc
import groovy.sql.Sql
def connectsql(){
    def db_url="jdbc:mysql://10.41.1.201:3306/devops"
    def username="root"
    def password="efssc@123456"
    def driverClass="com.mysql.jdbc.Driver"
    def sql = Sql.newInstance("${db_url}", "${username}", "${password}", "${driverClass}")
    return sql
}

def saveversion(appname,imagetag,publishenv,sql){
    def params = ["${appname}","${imagetag}", "${publishenv}"]
    sql.execute "insert into publish_version_control (create_date,appname,imagetag,publishenv) value(now(),${appname},${imagetag},${publishenv}"
}
def searchversin(appname,imagetag,publishenv,sql){
    def
}

def main(appname,imagetag,publishenv,sql){

}